<?php
/**
 * @author  sandeep
 */
 
class MimeMail
{
    public function createMail()
    {
        require_once 'Zend/Mail.php';
        $mail = new Zend_Mail();
        $this->_validateMail($message);
        $mail->addTo($message['to'],$message['name']);
        $mail->addBcc($message['bcc']);
        $mail->setBodyHtml($message['body']);
        $mail->setSubject($message['subject']);
        if ($message['attachment']) {
            $body = file_get_contents($message['attachment']['test']['tmp_name']);
            $mail->createAttachment($body,$message['attachment']['test']['type'],'attachment','base64',$message['attachment']['test']['name']);
        }
    }
}